package com.jia.controller;


import com.jia.common.lang.R;
import com.jia.entity.ChatFriend;
import com.jia.service.ChatFriendService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 杜佳佳
 * @since 2021-05-30
 */
@RestController
@RequestMapping("/admin/chat/friend")
@Api(tags = "好友管理")
public class ChatFriendController {

    @Autowired
    private ChatFriendService chatFriendService;

    @GetMapping("/getFriendListByUserId/{userId}")
    public R getFriendListByUserId(@PathVariable String userId) {
        List<ChatFriend> list = chatFriendService.getFriendListByUserId(userId);
        return R.ok().data("list",list);
    }

}

